<?php
// 1. Nhung tap tin fckeditor vao file chay
include 'fckeditor/fckeditor.php';

// 2. Khai bao duong dan URL den thu muc fckeditor
$sBasePath = '/test-scripts/fckeditor/';

// 3. Khoi tao doi tuong fckeditor
$oFCKeditor = new FCKeditor('FCKeditor1') ;

// 4. Thiet lap duong dan cho thuoc tinh basePath
$oFCKeditor->BasePath = $sBasePath;

// 5. Dua gia tri vao fckeditor
$oFCKeditor->Value = 'Huong dan cau hinh fckeditor';

// 6. Thay doi kich thuoc cua fckeditor
$oFCKeditor->Width = '100%'; // '100%'
$oFCKeditor->Height = 400;
$oFCKeditor->ToolbarSet = 'Default';
$oFCKeditor->Config['AutoDetectLanguage'] = false;
$oFCKeditor->Config['DefaultLanguage'] = 'en';

// 8. Tao fckeditor
$oFCKeditor->Create() ;